
<?php
//include 'login_to_database.php';
mysql_connect('localhost', 'root', '');  
mysql_select_db('testss');
$id = $_POST['hovered_id'];
//echo $id; 
$result = mysql_query("SELECT * FROM `books` WHERE `id-cate` = '$id'") or die(mysql_error());
//$staff = mysql_fetch_array($result);
$i=0;

while($staff = mysql_fetch_array($result))
{
$i++;?>
<div class="<?php echo "anh-slide".$i;?>">
<span><?php echo $staff['title']; ?> </span>
<p class="<?php echo "nd".$i; ?>"><?php echo $staff['title']; ?> </p>
</div>	
<?php }
//print_r($staff);
//echo json_encode($staff);
?>